<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<body>
	<f:view>
		<ui:composition template="../template/template.xhtml">
			<ui:define name="titel">
				Foto Upload
			</ui:define>
			<ui:define name="content">
				<h:form id="mainForm">
					<p:growl id="growl" showDetail="true" life="3000" />
						<div style="width:100%; text-align:left; margin-left:20px">
							<h:outputLabel for="thema" value="Thema: "  />
							<p:autoComplete id="thema" effect="fade" dropdown="true" value="#{uploadBean.thema}"    
					        	completeMethod="#{uploadController.autoComplete()}" minQueryLength="2" >  
					            <p:ajax event="keyup" />  
					        	<p:ajax event="itemSelect" />  
					    	</p:autoComplete>
						</div>
				    	<br/>
						<p:fileUpload id="fileUpload" fileUploadListener="#{uploadController.handleFileUpload}"
							update="growl" multiple="true" dragDropSupport="true"
							allowTypes="/(\.|\/)(gif|jpe?g|png)$/" cancelLabel="Alle Entfernen"
							uploadLabel="Bilder Hochladen" label="Bild Hinzufügen" 
							oncomplete="#{galerieController.update()}"/>
				</h:form>
			</ui:define>
		</ui:composition>
	</f:view>
</body>
</html>